package dto

import (
	"service/app/mode"
	"time"
)

type CostAddDto struct {
	RoomId      uint      `json:"room_id"  form:"room_id" binding:"required" required_msg:" room_id 为必填项目" validate:"required"`
	Power       float64   `json:"power"  form:"power" binding:"required" required_msg:" power 为必填项目" validate:"required"`
	Water       float64   `json:"water"  form:"water" binding:"required" required_msg:" water 为必填项目" validate:"required"`
	Record_time time.Time `json:"record_time"  form:"record_time" binding:"required" required_msg:" record_time 为必填项目" validate:"required"`
	Pay_status  int       `json:"pay_status"`
}

func (m *CostAddDto) ConverCost(obj *mode.Db_cost) {
	obj.RoomId = m.RoomId
	obj.Power = m.Power
	obj.Water = m.Water
	obj.Record_time = m.Record_time
	obj.Pay_status = m.Pay_status
}
